import QtQuick 1.1
import com.nokia.meego 1.0

Rectangle {
    id: container
    property alias name: settingName.text
    property alias value: switchButton.checked
    property bool enabled: true
    property color textColor: "white"
    property int leftMargin: 6
    color: "transparent"

    Label {
        id: settingName
        anchors.left: parent.left
        anchors.leftMargin: container.leftMargin
        anchors.verticalCenter: parent.verticalCenter
        font.bold: true
        font.pixelSize: 28
        color: container.textColor
        verticalAlignment: Text.AlignVCenter
    }

    Switch {
         id: switchButton
         anchors.right: parent.right
         anchors.verticalCenter: parent.verticalCenter
    }
    MouseArea {
        id: mouseArea
        enabled: !container.enabled
        anchors.fill: parent
    }
}
